home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfucompare.z / pxfucompare
Encoding:
Text File  |  1998-10-30  |  3.5 KB  |  88 lines

  1. PXFUCOMPARE(3F)                                        Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFUUCCOOMMPPAARREE - Compares unsigned integers
  6.  
  7. SSYYNNOOPPSSIISS
  8.      SSUUBBRROOUUTTIINNEE PPXXFFUUCCOOMMPPAARREE ((_i_1,, _i_2,, _i_c_m_p_r,, _i_d_i_f_f))
  9.      IINNTTEEGGEERR _i_1,, _i_2,, _i_c_m_p_r,, _i_d_i_f_f
  10.  
  11. IIMMPPLLEEMMEENNTTAATTIIOONN
  12.      UNICOS, UNICOS/mk, and IRIX systems
  13.  
  14. DDEESSCCRRIIPPTTIIOONN
  15.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  16.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  17.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  18.      7.2 F77 compiler.
  19.  
  20.      The PPXXFFUUCCOOMMPPAARREE routine performs comparisons of C unsigned integers
  21.      returned by some IEEE FORTRAN 77 routines.
  22.  
  23.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  24.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  25.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  26.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  27.      IRIX, the default kind is KKIINNDD==44.
  28.  
  29.      The following is a list of arguments for this routine:
  30.  
  31.      _i_1        An input integer variable for a C unsigned integer.
  32.  
  33.      _i_2        An input integer variable for a C unsigned integer.
  34.  
  35.      _i_c_m_p_r     An output integer variable that, on return from the routine,
  36.                contains one of these values:
  37.                -1 If _i_1 < _i_2
  38.                 0 If _i_1 = _i_2
  39.                 1 If _i_1 > _i_2
  40.  
  41.                All of the comparisons are made using C unsigned integer
  42.                comparisons.
  43.  
  44.      _i_d_i_f_f     An output integer variable that on return from the routine
  45.                contains the absolute value of the difference of _i_1 and _i_2.
  46.                Since the values are C unsigned integers and FORTRAN 77 does
  47.                not directly support unsigned integers the value may be
  48.                negative, which indicates the value is beyond the maximum
  49.                positive value of a FORTRAN 77 integer.
  50.  
  51. EEXXAAMMPPLLEESS
  52.      In this example, the program calls PPXXFFTTIIMMEESS(3F) to return the process
  53.      time information and then uses PPXXFFUUCCOOMMPPAARREE to determine if the system
  54.      time was greater than 1000000000 clock ticks.
  55.  
  56. program testpxf
  57. integer itime, jtms, ierr, stime, icmpr, idiff
  58.  
  59. call PXFSTRUCTCREATE('tms',jtms,ierr)
  60. if (ierr .ne. 0) then
  61.   print *,'FAILED: PXFSTRUCTCREATE call with error = ',ierror
  62. else
  63.   call PXFTIMES(jtms,itime,ierr)
  64.   if (ierr .ne. 0) then
  65.      print *,'FAILED: PXFTIMES call with error = ',ierror
  66.   else
  67.      call PXFINTGET(jtms,'tms_stime',stime,ierr)
  68.      if (ierr .ne. 0) then
  69.         print *,'FAILED: PXFINTGET call for tms_stime with error = ',ierror
  70.      else
  71.         CALL PXFUCOMPARE(stime,1000000000,icmpr,idiff)
  72.         if (icmpr .eq. 1) then
  73.           print *,'System time longer than 1000000000 clock ticks.'
  74.         else
  75.           print *,'System time less than or equal to 1000000000 clock ticks.'
  76.         endif
  77.      endif
  78.   endif
  79. endif
  80. end
  81.  
  82. SSEEEE AALLSSOO
  83.      PPXXFFTTIIMMEESS(3F)
  84.  
  85.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  86.      2165, for the printed version of this man page.
  87.  
  88.